package cn.iocoder.yudao.module.wine.dal.mysql.supplyfavorite;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.wine.dal.dataobject.supplyfavorite.SupplyFavoriteDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.wine.controller.app.supplyfavorite.vo.*;

/**
 * 供求信息收藏 Mapper
 *
 * @author 管理员
 */
@Mapper
public interface SupplyFavoriteMapper extends BaseMapperX<SupplyFavoriteDO> {

    default PageResult<SupplyFavoriteDO> selectPage(AppSupplyFavoritePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<SupplyFavoriteDO>()
//                .eqIfPresent(SupplyFavoriteDO::getUserId, reqVO.getUserId())
//                .eqIfPresent(SupplyFavoriteDO::getSupplyInfoId, reqVO.getSupplyInfoId())
//                .betweenIfPresent(SupplyFavoriteDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(SupplyFavoriteDO::getId));
    }

}
